<template>
    <div>
       <div>count: {{count}}</div>
       <button @click="increment1">mutation</button>
       <button @click="increment2">action</button>
    </div>
</template>

<script>
export default {
    computed:{
        count(){
            return this.$store.state.count
        }
    },
    methods:{
        increment1(){
            this.$store.commit('increment1')
        },
        increment2(){
            this.$store.dispatch('increment2')
        }
    },
   
}
</script>